package com.xpgk.mvc.ddc.ddc_vehicleChangeName;

import java.util.Date;
import java.util.List;

import com.jfinal.aop.Before;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;
import com.jfinal.plugin.activerecord.tx.Tx;
import com.xpgk.mvc.base.BaseController;
import com.xpgk.mvc.ddc.entity.Vehicle;
import com.xpgk.mvc.ddc.fineRegistration.FineRegistration;
import com.xpgk.mvc.organization.Organization;

public class VehicleChangeNameController extends BaseController{

	private VehicleChangeNameService vehicleChangeNameService;
	public void index(){
		render("/ddc_vehicleChangeName/vehicleChangeName.html");
	}

	@Before(Tx.class)
	public  void  saveInfo(){	
		Vehicle  c=getModel(Vehicle.class);
		String clbg = "0";
		if(getPara("clbg")!=null&&!getPara("clbg").equals("")){
			clbg = "1";
		}
		FineRegistration fineRegistration = getModel(FineRegistration.class);
		String oldIds = fineRegistration.getStr(FineRegistration.column_VID);
		boolean f = vehicleChangeNameService.vehicleChangeName(c,oldIds,clbg,getCUserdeptIds());
		renderText(f+"");
	}
	

}
